]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Redisplay folders before AppDisplay
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 19 May 2020 20:32:22 +0000 (17:32 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 18 Jun 2020 13:30:12 +0000 (10:30 -0300)
When filtering out the app icons, AppDisplay calls FolderIcon.getAppIds(),
which then calls FolderView.getAllItems(). This last function reads the
already added app icons inside the given folder, and return their app ids.

So far, so good.

When the GSettings backing a folder changes, FolderIcon emits 'apps-changed'
to notify AppDisplay that the folder changed.

Cool.

When AppDisplay receives this signal, it first recreates its own icons, then
updates the folders, and finally hides the icons that are inside folders.

This series of events is unfortunate. Future patches will need the folder
to be updated *before* AppDisplay updates its own icons.

Update folder icons before chaining up to BaseAppView._redisplay().

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271

js/ui/appDisplay.js

index 0b545230a6b7c998bb46b2b9b316981d86fc93f9..68b60d700091b642205efe2c936db46d8f3d5072 100644 (file)
@@ -430,11 +430,11 @@ class AppDisplay extends BaseAppView {
     }
 
     _redisplay() {
-        super._redisplay();
-
         this._folderIcons.forEach(icon => {
             icon.view._redisplay();
         });
+
+        super._redisplay();
         this._refilterApps();
     }